#include <iostream>
#include <ctime>
int seven(bool do_throw)
{
    if(do_throw)
        throw 7;
    else
        return 7;
}
int main()
{
    unsigned long return_count = 0;
    std::clock_t end = std::clock() + 5*CLOCKS_PER_SEC;
    do{
        int sept = seven(false);
        ++return_count;
    }while(std::clock() < end);
    std::cout << "Plain return:" << return_count/5 << " times per second" << std::endl;

    return_count = 0;
    end = std::clock() + 5*CLOCKS_PER_SEC;
    do{
        try{
            seven(true);
        }
        catch(int sept){
            ++return_count;
        }
    }while(std::clock() < end);
    std::cout << "Throw return: " << return_count/5 << " times per second" << std::endl;
    return 0;
}
        
